/** 数据字典 */

var dicts = [
    {
        id: 1,
        name: '学校',
        superId: 0
    },
    {
        id: 2,
        name: '学历',
        superId: 0
    },
    {
        id: 11,
        name: '天津工业大学',
        superId: 1
    }, {
        id: 12,
        name: '天津农业大学',
        superId: 1
    }, {
        id: 13,
        name: '专科',
        superId: 2
    }, {
        id: 14,
        name: '本科',
        superId: 2
    }
]

var express = require('express');
var router  = new express.Router();


router.get('/school/list',function (req,res) {

     var schools = dicts.filter(function (item) {
         return item.superId==1;
     })

    res.json(schools);
})

router.get('/xueli/list',function (req,res) {

    var schools = dicts.filter(function (item) {
        return item.superId==2;
    })

    res.json(schools);
})


module.exports = router;